import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'




Vue.use(VueRouter)

const routes = [{

        path: '/',
        name: 'login',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/login.vue')
    },
    {




        path: '/Home',
        name: 'Home',
        component: Home,
        children: [{
                path: '/file',
                name: 'file',
                component: () =>
                    import ( /* webpackChunkName: "about" */ '@/components/file/file.vue'),
                meta: { title: 'file', icon: 'file', role: ['admin', 'super_editor'] }

            },
            {

                path: '/HomeComponents',
                name: 'HomeComponents',
                // route level code-splitting
                // this generates a separate chunk (about.[hash].js) for this route
                // which is lazy-loaded when the route is visited.
                component: () =>
                    import ( /* webpackChunkName: "about" */ '../views/HomeComponents/HomeComponents.vue'),
                meta: { title: 'HomeComponents', icon: 'HomeComponents', role: ['admin', 'super_editor'] }

            },
            {

                path: '/skin',
                name: 'skin',

                component: () =>
                    import ( /* webpackChunkName: "about" */ '../views/skin/skin.vue'),
                meta: { title: 'skin', icon: 'skin', role: ['super_editor'] },


            },
            {

                path: '/SidebarItem',
                name: 'SidebarItem',

                component: () =>
                    import ( /* webpackChunkName: "about" */ '@/views/SidebarCompoents/SidebarItem.vue'),
                meta: { title: 'SidebarItem', icon: 'SidebarItem', role: ['super_editor'] },


            }
        ]

    },









]

const router = new VueRouter({
    routes
})

export default router